<?php
class LinkWidget extends Widget
{
    public function render($data)
    {
        if (S('links')) {
            $links	=	S('links');
        } else {
            $links = D("Link")->order("orderId")->select();
            S('links', $links);
        }
        $data['links'] = $links;
        $content = $this->renderFile('link',$data);
        return $content;

    }
}
